<!doctype html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title><?=$title;?></title>
<meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible">
<meta content="<?=$keywords;?>" name="keywords">
<meta content="<?=$description;?>" name="description">
<link type="text/css" href="<?=STATIC_URL;?>css/base.css" rev="stylesheet" rel="stylesheet">
<link type="text/css" href="<?=STATIC_URL;?>css/waimai.css" rev="stylesheet" rel="stylesheet">
<link href="<?=STATIC_URL;?>favicon.ico" type="image/x-icon" rel="icon" />
<link href="<?=STATIC_URL;?>favicon.ico" type="image/x-icon" rel="shortcut icon" />
<body>
<!------------------------------------>
<? include 'com-header.tpl.php'; ?>
<!------------------------------------>
<div id="container">
  <div class="other_position"><a class="home" href="http://www.sudingke.com">速订客</a><span>»</span><a title="大连婚宴酒店" href="/waimai">外卖</a><span>»</span>搜索</div>
  <div class="intro">
    <div id="search_box">
      <div class="search_line">
        <div class="break_bg1">区域搜索</div>
        <ul>
            <li><a<?php if(0 == $big_zone_id){ echo ' class="current"'; } ?> href="/waimai">全部</a></li>
         <?php
            $bigZoneList = $zone->getZoneList(0);
            foreach($bigZoneList as $zoneItem){
         ?>
            <li><a href="/waimai/<?=$zoneItem->pinyin;?>?q=<?=$query;?>" <?php if($zoneItem->zone_id == $big_zone_id){ echo ' class="current"'; } ?>><?=h($zoneItem->name);?></a></li>
         <?php
            }
         ?>
        </ul>
      </div>
      <?php
         $subZoneList = $zone->getZoneList($big_zone_id);
         if($subZoneList && is_array($subZoneList)){
      ?>
      <div class="search_line">
        <div class="break_bg1">板块搜索</div>
        <ul>
         <?php
            foreach($subZoneList as $zoneItem){
         ?>
            <li><a href="/waimai/<?=$zoneItem->pinyin;?>?q=<?=$query;?>" <?php if($zoneItem->zone_id == $sub_zone_id){ echo ' class="current"'; } ?>><?=h($zoneItem->name);?></a></li>
         <?php
            }
         ?>
        </ul>
      </div>
      <?php
        }
      ?>
<?php
/*
      <!--
      <div class="search_line"> <span class="break_bg1">热点商圈</span>
        <ul>
          <li><a href="#">全部</a>
          <li><a class="current" href="#">南山区</a>
          <li><a href="#">罗湖区</a>
          <li><a href="#">福田区</a>
          <li><a href="#">宝安区</a>
          <li><a href="#">龙岗区</a>
          <li><a href="#">盐田区</a>
          <li><a href="#">全部</a>
          <li><a href="#">南山区</a>
          <li><a href="#">罗湖区</a>
          <li><a href="#">福田区</a>
          <li><a href="#">宝安区</a>
          <li><a href="#">龙岗区</a>
          <li><a href="#">盐田区</a>
          <li><a class="current" href="#">所有商圈</a>
          <li><a href="#">华侨城</a>
          <li><a href="#">南山中心区</a>
          <li><a href="#">蛇口</a>
          <li><a href="#">南头</a>
          <li><a href="#">南油</a>
          <li><a href="#">科技园</a>
          <li><a href="#">西丽</a>
        </ul>
      </div>
      <div class="search_line"> <span class="break_bg1">热门餐馆</span>
        <ul>
          <li> <a href="#">毛家饭店</a>
          <li><a href="#">真功夫</a>
          <li><a href="#">肯德基</a>
          <li><a href="#">麦当劳</a>
          <li><a href="#">KTV</a>
          <li><a href="#">婚纱摄影</a>
          <li><a href="#">韦博国际英语</a>
          <li><a href="#">易贝乐少儿英语</a>
        </ul>
      </div>
      -->
*/
?>
      <div class="clear"></div>
    </div>
    <!-----------------search_box------------------->
    <!--site-->
    <div class="intro_site">
      <h2 class="title"><span>餐馆搜索</span><em></em></h2>
      <div class="site_content">
        <div class="act_item" id="content">
        <?php
            foreach($result as $shop){
                $url     = '/shop/'.$shop['shop_id'];
                $name    = $shop['name'];
                $picture = empty($shop['picture']) ? STATIC_URL.'img/store_nopic.jpg' : UPLOAD_URL.$shop['picture'];
                //订餐电话
                if($shop['call_number']){
                    $order_call = '400-0411-569 转 '.$shop['call_number'];
                }else{
                    if($shop['status'] >= 2){
                        $order_call = '400-0411-569';
                    }else{
                        $order_call = '';
                    }
                }
                $bigZone = $zone->getZoneById($shop['zone_id']);
                $subZone = $zone->getZoneById($shop['subzone_id']);

                $list_data = unserialize($shop['list_data']);
                $delivery_time = isset($list_data['delivery_time']) ? $list_data['delivery_time'] : '';
                $delivery_desc = isset($list_data['delivery_desc']) ? $list_data['delivery_desc'] : '';
        ?>
            <dl>
              <dt><a title="<?=h($name);?>" target="_blank" href="<?=$url;?>"><img src="<?=$picture;?>"></a></dt>
              <dd class="item_title"><a title="<?=h($name);?>" target="_blank" href="<?=$url;?>"><?=h($name);?></a>
                <span><?php if($shop['status'] >=2){?><a title="网上订餐" target="_blank" href="<?=$url;?>"><img src="<?=STATIC_URL;?>img/waimai/tag_order.gif" height="16" align="absmiddle" alt="支持在线订餐" /></a><?php } ?></span>

                <span class="tel"><?=h($order_call);?></span>
              </dd>
              <dd>送餐时间：<?=$delivery_time; ?></dd>
              <dd>配送区域：<?=h(cutstr($delivery_desc, 64));?></dd>
              <dd>餐厅位置：
                <?php if($bigZone) {?>
                    <a class="bline" href="/waimai/<?=$bigZone->pinyin;?>"><?=h($bigZone->name);?></a> /
                    <a class="bline" href="/waimai/<?=$subZone->pinyin;?>"><?=h($subZone->name);?></a>
                <?php }else{ ?>
                    <?=$shop['address'];?>
                <?php } ?>
              </dd>
              <dd class="item_link">
                  <a class="link_view" title="立即去『<?=h($name);?>』订餐" target="_blank" href="<?=$url;?>"><span class="exp">立即订餐</span></a>
              </dd>
            </dl>
        <?php
            }
        ?>
        </div>
        <div class="item_page_vis" id="fen_ye">
              <div class="pages">
                <?=$pages;?>
              </div>
        </div>
      </div>
    </div>
    <!--act-->
    <div class="sidebar">
      <div id="NewestOrder" style="height:250px;width:250px;overflow:hidden;padding:15px;border:1px solid #CCC;background:#FFFEF8;height:250px;">
<script type="text/javascript">var cpro_id = "u1058264";</script>
<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
      </div>
      <div>&nbsp;</div>

      <!-- 速定客话题 -->
      <div id="AnswerQuestion" class="intro_act">
        <h2 class="title"><span>速定客话题</span><em></em></h2>
<?php
    $cityname = App::getCityName();
    $topics = array(
        '美食美味',
        '中午吃什么',
        '秀色可餐',
        '美食介绍',
        '菜品制作',
        $cityname.'小吃',
        $cityname.'外卖',
        $cityname.'美食',
        $cityname.'美味',
        $cityname.'菜谱',
    );
    $atopic = $topics[array_rand($topics)];
    $ptopic = '速订客~'.$atopic;
    if(strpos($atopic, '大连') === false){
        $atopic = '大连~'.$atopic;
    }

?>
<iframe width="100%" height="480" frameborder="0" scrolling="no" src="http://widget.weibo.com/livestream/listlive.php?language=zh_cn&width=0&height=500&uid=2607714464&skin=1&refer=0&pic=1&titlebar=0&border=1&publish=1&atalk=1&recomm=0&at=0&ptopic=<?=urlencode($ptopic);?>&atopic=<?=urlencode($atopic);?>&appkey=3459119526&dpc=1"></iframe>
    </div>

      <div id="AnswerQuestion" class="intro_act">
        <h2 class="title"><span>赞助商</span><em></em></h2>
        <div class="act_content" style="padding:17px 17px 0">
<script type="text/javascript">var cpro_id = "u1058264";</script>
<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
        </div>
        <div class="act_content_btm"></div>
      </div>
    </div>

  </div><div class="clear"></div>
</div>
<!------------------------------------>
<? include 'com-footer.tpl.php'; ?>
<!------------------------------------>
</body>
</html>
